#include <cmath>

#include <iostream>

#include "onb.hpp"

int main(int, char*[])
{
  ::std::cout << etl::cross(
    etl::vector<double, 3>(1., 0., 0.),
    etl::vector<double, 3>(0., 1., 0.)) <<
    std::endl;

  etl::vector<float, 3> u(1.0f, 2.0f, 3.0f);

  etl::vector<float, 3> v(etl::ortho(u));

  std::cout << v << std::endl;

  std::cout << etl::dot(u, v) << std::endl;

  u = { 2.0f, 1.0f, 3.0f };

  v = etl::ortho<0>(u);

  std::cout << v << std::endl;

  std::cout << etl::dot(u, v) << std::endl;

  u = { 3.0f, 2.0f, 1.0f };

  v = etl::ortho(u);

  std::cout << v << std::endl;

  std::cout << etl::dot(u, v) << std::endl;

  auto w = etl::cross(u, v);

  std::cout << w << std::endl;

  std::cout << etl::dot(w, u) << std::endl;
  std::cout << etl::dot(w, v) << std::endl;

  ::etl::vector<double, 6> h(1., 1., 1., 1., 1., 1.);
  ::etl::vector<double, 6> j(1., 1., 1., 1., 1., 1.);

  std::cout << etl::dot(h, j) << std::endl;
}
